package myschool.test;

import myschool.dao.SubjectDao;
import myschool.entity.Subject;
import myschool.util.MyBatisUtil;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;

import java.io.IOException;
import java.io.Reader;
import java.util.Arrays;
import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class testsubjectUP {
    public static void main(String[] args) {
        SqlSession s= MyBatisUtil.get();

        Subject sub=new Subject();
        sub.setClasshour(99);
        sub.setGradeid(9L);
        sub.setSubjectname("14天精通前端");
        sub.setId(44L);
        int r=s.update("myschool.dao.SubjectDao.update",sub);
        System.out.println("更新了"+r+"行");
        MyBatisUtil.close(s);
    }
}
